<template>
  <u-popup v-model="visible" mode="center" width="540" border-radius="14" :mask-close-able="false">
    <view class="prevent-popup" v-if="!$u.test.empty(datas)">
      <view class="prevent-popup-title">防挂机验证</view>
      <view class="prevent-popup-content">{{ datas.alert_content }}</view>
      <view class="prevent-popup-submit">
        <view class="btn" @click="handletContinue">确认</view>
      </view>
    </view>
  </u-popup>
</template>

<script>
export default {
  props: {
    datas: {
      type: Object,
      default: () => {},
    },
  },
  data() {
    return {
      visible: false,
    }
  },
  methods: {
    // 继续学习
    handletContinue() {
      this.onClose()
      this.$emit('click')
    },
    /*打开弹窗*/
    onOpen() {
      this.visible = true
    },
    /*关闭弹窗*/
    onClose() {
      this.visible = false
    },
  },
}
</script>
<style lang="scss" scoped>
.prevent-popup {
  padding-top: 50rpx;
  &-title {
    margin-bottom: 8rpx;
    font-size: 30rpx;
    font-weight: 500;
    color: $edu-main-color;
    line-height: 36rpx;
    text-align: center;
  }
  &-content {
    margin-bottom: 38rpx;
    font-size: 24rpx;
    font-weight: 400;
    color: $edu-tips-color;
    line-height: 36rpx;
    text-align: center;
  }
  &-submit {
    border-top: 1px solid #dddddd;
    .btn {
      height: 100rpx;
      font-size: 32rpx;
      font-weight: 400;
      @include text-color;
      line-height: 100rpx;
      text-align: center;
    }
  }
}
</style>
